const queryString = require('query-string')

const getUrlParam = (name) => {
    const hash = '#/?tmpTicket=6bb501a0-3435-45b2-bf9d-e3e5e0a9a9b2'
    let [pre, suf] = hash.split('?')
    const parsed = queryString.parse(suf);
    delete parsed[name];
    if (Object.keys(parsed).length > 0) {
        let newhash = queryString.stringify(parsed)
        return (pre + '?' + newhash)
    } else {
        return pre
    }
}
